#include <crt_util.h>

int init_sockenv(int low, int high)
{
#if (TARGET_OS == OS_WIN)
    WORD verision = MAKEWORD(low, high);
    WSADATA lpData;
    int intEr = WSAStartup(verision, &lpData);
    if (intEr != 0) {
        return S_ERROR;
    }
#endif
    return S_SUCCESS;
}

int uninit_sockenv(int low, int high)
{
#if (TARGET_OS == OS_WIN)
    if (WSACleanup() != 0) {
        return S_ERROR;
    }
#endif
    return S_SUCCESS;
}

int init_rpcenv(LPCSTR guid)
{
    return S_SUCCESS;
}
int uninit_rpcenv(LPCSTR guid)
{
    return S_SUCCESS;
}
int get_target_bits(void)
{
    return TARGET_BITS;
}
int get_target_os(void)
{
    return TARGET_OS;
}
int get_target_type(void)
{
    return TARGET_TYPE;
}
int get_os_compiler(void)
{
    return OS_COMPILER;
}
